// HomeNet Device LCD - 2 line
// 12-13-2010 <mdoll@email.usf.edu> http://opensource.org/licenses/mit-license.php

#ifndef HomeNetDeviceLCD_h
#define HomeNetDeviceLCD_h

#include <WProgram.h>
#include <stdint.h>

#include <../../../../libraries/Ports/PortsLCD.h>

//#include <HomeNet.h>
//#include <HomeNetConfig.h>
//#include <HomeNetDevices.h>

////////////////////////////LCD////////////////////////////

class HomeNetDeviceLCD : public HomeNetDevicePortI2C {
public:
    typedef struct {
        uint8_t row;
        uint16_t fromNode;
        uint8_t fromDevice;
        char message[17];
    } Display;

    HomeNetDeviceLCD(HomeNet& homeNet ) : HomeNetDevicePortI2C(homeNet) {}
    inline uint16_t getId(){ return 0x0009; }
    void init(uint8_t);
    HomeNetPartialPacket* process(const uint16_t& fromNode, const uint8_t& fromDevice, const uint8_t&, const HomeNetPayload& );
    void registerDisplay(Display[], uint8_t);

private:
    LiquidCrystalI2C * _lcd;
    Display * _display;
    uint8_t _displayCount;
};
#endif